
import 'package:baselib/base/base_service.dart';
import 'package:baselib/net/baseentity.dart';
import 'package:framelib/net/request_manager.dart';
import 'package:moduleone/entity/news_entity.dart';
import 'package:moduleone/entity/user_entity.dart';
import 'package:moduleone/module/service/net/module_one_net_utils.dart';


/**
 * GetOne 网络层
 */
class ModuleOneService with BaseService{

  int getCount(int count){
    return count=count+1;
  }

  getData() async{
    // BaseEntity requestGetData =await RequestManager.postData('/it/u=2605112544,759365927&fm=15&fmt=auto&gp=0.jpg');
    // print('requestGetData-->${requestGetData?.toString()}');
    // requestGetData?.data={'name':'lilin','age':28};
    // requestGetData?.data=UserOneEntity.fromJson(requestGetData?.data);

    //https://www.chinawylm.com/api.php/article/articlelist
    BaseEntity requestGetData =ModuleOneNetUtils.postData<NewsEntity>('/article/articlelist');
    print('requestGetData-->${requestGetData?.toString()}');
    return requestGetData;
  }

  getListData<T>(){
    List<T> list=[];

  }
  getDataTwo() async{
    BaseEntity requestGetData =await RequestManager.postData(
        '/it/u=2605112544,759365927&fm=15&fmt=auto&gp=0.jpg',
      baseUrl: 'https://img2.baidu.com/'
    );
    return requestGetData;
  }
}